import {Entity, Column, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn} from 'typeorm';

import {ApiProperty} from "@nestjs/swagger";

@Entity({name:'pay_water'})
export class PayWaterEntity{

    @PrimaryGeneratedColumn()
    @ApiProperty({description: '主键'})
    id: number

    @Column()
    @ApiProperty({description: '用户id'})
    userId: number

    @Column()
    @ApiProperty({description: '订单编号'})
    orderCode: string

    @Column()
    @ApiProperty({description: '支付前金额'})
    payBeforeAmount: number

    @Column()
    @ApiProperty({description: '支付金额'})
    payAmount: number

    @Column()
    @ApiProperty({description: '支付后金额'})
    payAfterAmount: number

    @Column()
    @ApiProperty({description: '交易流水号'})
    tradeCode: string

    @Column()
    @ApiProperty({description: '支付方式#1-微信;2-支付宝;3-积分 '})
    payWay: number

    @CreateDateColumn()
    @ApiProperty({description: '创建时间'})
    createdTime: Date

    @UpdateDateColumn()
    @ApiProperty({description: '更新时间'})
    updatedTime: Date

}